## Compiling

### Opening the project

- You need Lazarus IDE to build this project. Download Lazarus from <https://www.lazarus-ide.org/> and install it. Make sure it detects the FPC and FPC sources location correctly (if you've installed FPC separately before, this might not be the case.)

- Download the project, extract it into its own directory.

- In the Lazarus IDE, choose Project > Open Project (Ctrl+F11), choose rainboweditor.lpi from the rainbow-editor folder.

![Project > Open Project is in topmost window's menu](img/open-project.png)

### Installing the BGRABitmap library

If you haven't installed BGRABitmap before, you'll have to do it now:

- If you open rainboweditor.lpi without BGRABitmap library isntalled, you'll see an error message about BGRABitmapPack missing

![The error will be in a dialog message window](img/missing-bgrabitmappack.png)

- Download a BGRABitmap release from <https://github.com/bgrabitmap/bgrabitmap/releases>

- Unpack it somewhere

- Choose the menu item Pacakge > Open Package file (.lpk). Open the BGRABitmapPack package from the BGRABitmap's bgrabitmap subfolder.

![Package is a menu in the topmost window.](img/open-pacakge-file.png)

- In a window that appears, select Use > Add to Project

![Use is a button with a lightning bolt icon](use-add-to-project.png)

### Compiling the project

— Open the project with Lazarus and compile it.
